﻿import request from "@/utils/request";
import { useSettingsStore } from "@/store";

const settingStore = useSettingsStore();
const BASE_URL = `/api/${settingStore.elementRoutePrefix}/Sensor`;
const BASE_URL_WITHOUT_E = `/api/Sensor`;

const SensorAPI = {
  // 获取平台待检测传感器列表
  getPendingSensors(param: { sensorCode: string; startDate?: string; endDate?: string }) {
    return request<any, PendingSensor[]>({
      url: `${BASE_URL_WITHOUT_E}/GetListInPlatform`,
      method: "post",
      data: param,
      headers: {
        "Content-Type": "application/json",
      },
    });
  },
};

export default SensorAPI;
